package com.atguigu.self.gulimall.product.feign;

import com.atguigu.self.common.to.SkuReductionTO;
import com.atguigu.self.common.utils.R;
import com.atguigu.self.common.to.SpuBoundTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 优惠券服务feign接口
 *
 * @Author Li Xinyang  <lixinyang@xxx.com>  2021/2/16 11:25
 **/
@Service
@FeignClient("gulimall-coupon")
public interface CouponFeignService {

    /**
     * spu 基本保存接口
     *
     * @param spuBoundTO
     * @return
     */
    @PostMapping("/coupon/spubounds/save")
    R saveSpuBounds(@RequestBody SpuBoundTO spuBoundTO);

    /**
     * sku 满减打折接口
     *
     * @param skuReductionTO 所有满减 满件  会员价格信息
     * @return
     */
    @PostMapping("coupon/skufullreduction/save-info")
    R saveSkuReduction(@RequestBody SkuReductionTO skuReductionTO);
}
